<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <link rel="stylesheet" type="text/css" href="../css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="../css/cart.css">
    <link rel="stylesheet" type="text/css" href="../css/index.css">
        <link rel="stylesheet" type="text/css" href="../font/iconfont.css"/>

</head>
<body>
    <script src="/lib/requirejs/require.js" data-main="/js/cart"></script>
   <!-- 头部布局 -->
    <header></header>
    <div class="cart_banner">
        <img src="../img/cat_banner.jpg" alt="">
    </div>
<div class="men cart empty">
        <h1>什么都没有</h1>
        <h2>请继续购物 <a href="/html/list.html">here</a>.</h2>
      </div>

    <div class="cart not-empty hidden">
       <table class="cart-table table table-bordered" >
            <thead>
            <tr>
              <td>序号</td>
                <td>商品</td>
                <td>链接</td>
                 <td>单价</td>
                  <td>数量</td>
                   <td>小计</td>
                    <td>操作</td>
            </tr>
            </thead>
            <tbody>
             <!-- 模板引擎 -->
            </tbody>
            <tfoot>
                <tr>
                    <td>合计(不含运费):</td>
                    <td><p style="color: red" class="total">0</p></td>
                </tr>
            </tfoot>
        </table>
    </div>
    <div class="cart_groups">
      <a class="ggg" href="/html/list.html">继续购物</a>
      <a class="bbb" href="/html/success.html">立即结算</a>
      <!-- <form>
        <input calss="ggg" type="submit" value="继续购物">
        <input calss="bbb" type="submit" value="立即结算">
      </form> -->
    </div>
    <footer></footer>
    <script type="text/html" id="cart-body-template">
      {{each products prod}}
       <tr>     
                <td class="id" style="text-align:center">{{prod.id}}</td>
                <td><img src="{{prod.img}}"></td>
                 <td><a href="#" target="_blank">{{prod.title}}</a></td>
                  <td>{{prod.price}}</td>
                   <td><span class="cut" >-</span>
                           <input type="text" class="amount"  value="{{prod.amount}}">
                           <span class="add">+</span>
                       </td>
                     <td class="sub">{{prod.price*prod.amount}}</td>
                     <td><a href="javascript:void(0);" class="del">删除</a></td>
                  <tr>
                    {{/each}}
          
    </script>
</body>
</html>
